package com.blockmeta.bbs.immodule.bean.sort;

import com.blockmeta.bbs.immodule.dao.ChatMessage;

import java.util.Comparator;

/**
 * Created by author on 2019/4/16.
 */

public class DateComparator implements Comparator<ChatMessage> {
    @Override
    public int compare(ChatMessage o1, ChatMessage o2) {
        if (o1.getDate() - o2.getDate() > 0) {
            return -1;
        }
        return 1;
    }
}
